package com.tarena.day0917;
public class PointDemo {
	
	public static void main(String[] args) {
		Point p1=new Point();
		Point p2=new Point();
		//引用变量P2  对象new Point()
		p2.x=3;p2.y=4;
		 p1.addx(5);//在p1上调用方法addx()
		 System.out.println(p1.x+","+p1.y);//5,0
		 p2.addy(5);//在p2上调用方法addy()
		 System.out.println(p2.x+","+p2.y);//3,9
		 p2.moveTo(10, 8);
		 System.out.println(p2.x+","+p2.y);//10,8
		
	}

}
